﻿@model Gueei.Gallery.Core.ViewModels.BatchFileImportViewModel

@{
    View.Title = "Batch Upload";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="@Url.Content("~/css/fileuploader.css")" type="text/css" rel="Stylesheet" />
<script src="@Url.Content("~/Scripts/fileuploader.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        var uploader = new qq.FileUploader({
        element: $(".fileUploader")[0],
        action: "/BatchUpload/AsyncUpload",
        //allowedExtensions: ['zip'],
        sizeLimit: 503316480,
        params: {
            batchId: "@Model.BatchId"
        },
        template: '<div class="qq-uploader">' +
        '<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>' +
        '<div class="qq-upload-button">Choose files to upload</div>' +
        '<ul class="qq-upload-list"></ul>' +
        '</div>'
        });
    });
</script>
<h2>
    BatchUpload version 2 : [@Model.BatchId]</h2>
@using (Html.BeginForm("Index", "BatchUpload", FormMethod.Post))
{
    @Html.HiddenFor(m=>m.BatchId)
    <p>
    @Html.LabelFor(m=>m.DefaultName)
    @Html.EditorFor(m=>m.DefaultName)
    </p>
    <p>
    @Html.LabelFor(m=>m.DefaultTags)
    @Html.TextBoxFor(m => m.DefaultTags, new { @class = "autocomplete tags", @ref = "/Search/Tags" })
    </p>
    <div class="fileUploader">
    </div>
    <input type="submit" />
}